package 异常;

import 集合.ArrayList;

import java.util.List;

//多个异常一次捕获一次处理
public class tryCatch2 {
    public static void main(String[] args) {
        try {



                int[] arr = {1, 2, 3};
                System.out.println(arr[3]);
                List a = (List) new ArrayList();
                a.add(1);
                a.add(2);
                a.add(3);
                Object o = a.get(3);
                System.out.println(0);
            }catch(ArrayIndexOutOfBoundsException e)
        {
            System.out.println(e);
        }
    }
}
